use prisma_client_rust::QueryError;
use uuid::Uuid;

use crate::prisma::{PrismaClient};

pub async fn config_seeder(client: &PrismaClient) ->Result<(), QueryError> {
    // 配置表默认数据

    if client.config().count(vec![]).exec().await? == 0 {
        client
            .config()
            .create(Uuid::new_v4().to_string(), String::from("password"), String::from("123456"), vec![])
            .exec()
            .await?;
    }

    Ok(())
}
